<include file="Public:header" />
<include file="Public:left" />
	<form action="" method="post" enctype="multipart/form-data" id="brandForm">
     <section>
      <h2><strong>项目分类</strong></h2>
      <input type="hidden" id="id" name="id" value="{$project_type_result.id}">
      <ul class="ulColumn2">
        <li>
            <span class="item_name" style="width:120px;">主题：</span>
            <input type="text" class="textbox textbox_295" name="title" id="title" placeholder="通知主题..." value="{$project_type_result.type_name}"/>
        </li>
        <li>
            <span class="item_name" style="width:120px;"></span>
            <input type="button" class="link_btn" value="提交"/>
        </li>
      </ul>
     </section>
	</form>
 </div>
</section>
<script>
  $(".link_btn").click(function(){
      if($("input[name='title']").val()==""){
          layer.alert("请选择项目类型!");
          return false;
      }


      var title = $("input[name='title']").val();
      var id = $("input[name='id']").val();

      var formData = new FormData();
      formData.append('title',title);
      formData.append('id',id);

      $.ajax({
          url:"{:url('Export/project_type_add')}",
          type:'POST',
          data:formData,
          async:false,
          processData:false,
          contentType:false,
          success:function(result){
              if(result.code == '0'){
                  layer.alert(result.msg);
              }else{
                  layer.alert(result.msg, {
                      btn: ['确定']
                  },
                  function (index, item) {
                      location.href = result.url;
                  });
              }
          }
      });
  });
</script>
</body>
</html>
